package com.itheima.idea;

public class Demo2 {
    public static void main(String[] args) {

    int[] arr = {1,2,3,4,5,6,7,8,9};
    wei(arr);
}
public static void wei(int arr[]){
        for(int statr = 0,end = arr.length-1;statr < end;statr++,end--){
            int temp =arr[statr];
            arr[statr] = arr[end];
            arr[end] = temp;

        }
    for (int i = 0; i < arr.length; i++) {
        System.out.print(arr[i]+" ");
    }
}



}

